package com.core.Massa;

import com.core.enumerators.MassaType;

public class MassaFactory {
	
	public static MassaBase Create(MassaType massaType, float valueTobeconverted ){
		 switch (massaType)
         {
             case Quilograma:
                 return new Quilograma(valueTobeconverted);
             case Grama:
                 return new Grama(valueTobeconverted);
             case Miligrama:
                 return new Miligrama(valueTobeconverted);
             case Libra:
                 return new Libra(valueTobeconverted);
             case Onca:
                 return new Onca(valueTobeconverted);
             default:
                 return null;
         }
	}
}
